<?php

namespace common\models\article;

use Yii;

/**
 * This is the model class for table "ln_video_ali".
 *
 * @property string $id
 * @property string $admin_id
 * @property string $user_id
 * @property string $title
 * @property integer $status
 * @property string $filename
 * @property integer $size
 * @property string $mime_type
 * @property integer $width
 * @property integer $height
 * @property integer $created_at
 * @property integer $updated_at
 */
class VideoAli extends \yii\db\ActiveRecord
{
    use \common\traits\TimestampBehavior;

    const STATUS_ACTIVE = 1;
    const STATUS_DEFAULT = 0;
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%video_ali}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['admin_id', 'user_id', 'status', 'size', 'width', 'height', 'created_at', 'updated_at'], 'integer'],
            [[ 'filename'], 'required'],
            [['title'], 'string', 'max' => 120],
            [['filename'], 'string', 'max' => 150],
            [['mime_type'], 'string', 'max' => 30]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'admin_id' => '管理员id',
            'user_id' => '用户id',
            'title' => 'Title',
            'status' => '状态',
            'filename' => '视频地址',
            'size' => 'Size',
            'mime_type' => 'Mime Type',
            'width' => 'Width',
            'height' => 'Height',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
        ];
    }
}
